<!DOCTYPE html>
<html>
<head>
    <% include ../common/meta.ejs %>
    <% include ../common/public.ejs %>
    <link href="<%= global.config.path.publicPath %>/libs/jquery-file-upload/css/jquery.fileupload.css" rel="stylesheet">
    <link href="<%= global.config.path.publicPath %>/libs/uedit/themes/default/css/umeditor.css" type="text/css"
          rel="stylesheet">
    <link href="<%= global.config.path.publicPath %>/custom/css/customer.css" rel="stylesheet">

</head>
<body>
<% include ../common/header.ejs %>

<div class="container">
    <div class="row">
        <% include ../common/menu.ejs %>

        <div id="content" class="col-lg-10 col-sm-11">
            <div class="page-header">
                <h1>
                    文章编辑
                    <small id="parseInfo">

                    </small>
                </h1>
                <div class="operationButton">
                    <button class="btn btn-default btn-primary" id="save">
                        <span class="glyphicon glyphicon-plus"></span> 保存
                    </button>
                    <button class="btn btn-default btn-default dol-goBack" id="cancel">
                        <span class="glyphicon glyphicon-plus"></span> 取消
                    </button>
                </div>
            </div>

            <form class="form-horizontal edit-form" id="edit-form">
                <input type="hidden" name="bookcase" value="<%= data.bookcase %>"/>
                <div class="panel panel-info">
                    <div class="panel-heading">
                        <div class="panel-title">
                            基本信息
                        </div>
                    </div>
                    <div class="panel-body">
                        <div class="row">
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label class="col-md-2 control-label">标题</label>
                                    <div class="col-md-10">
                                        <input class="form-control" name="name" type="text"/>
                                    </div>
                                </div>
                            </div>
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label class="col-md-2 control-label">
                                        <%if(body.pageType==='/team'){%>
                                        团队简介
                                        <%}else if(body.pageType==='/tabPage'){%>
                                        地点
                                        <%}else {%>
                                        作者
                                        <%}%>
                                    </label>
                                    <div class="col-md-10">
                                        <input class="form-control" name="author" type="text"/>
                                    </div>
                                </div>
                            </div>
                            <!--<div class="col-md-6">-->
                            <!--<div class="form-group">-->
                            <!--<label class="col-md-2 control-label">code</label>-->
                            <!--<div class="col-md-10">-->
                            <!--<input class="form-control" name="code" type="text"/>-->
                            <!--</div>-->
                            <!--</div>-->
                            <!--</div>-->
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label class="col-md-2 control-label">有效时间</label>
                                    <div class="col-md-10">
                                        <div class="input-group">
                                            <input type="text" class="form-control dolphin_date_picker"
                                                   name="effectiveTime">
                                            <span class="input-group-addon">至</span>
                                            <input type="text" class="form-control dolphin_date_picker"
                                                   name="disActiveTime">
                                        </div><!-- /input-group -->
                                    </div>
                                </div>
                            </div>
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label class="col-md-2 control-label" >排序</label>
                                    <div class="col-md-10">
                                        <input class="form-control" name="sort" type="number" placeholder="从小到大"/>
                                    </div>
                                </div>
                            </div>
                            <div class="col-md-12">
                                <div class="form-group">
                                    <label class="col-md-1 control-label">第三方链接</label>
                                    <div class="col-md-11">
                                        <input class="form-control" name="thirdUrl" type="text"/>
                                    </div>
                                </div>
                            </div>
                            <div class="col-md-12" hidden>
                                <div class="form-group">
                                    <label class="col-md-1 control-label">图标颜色</label>
                                    <div class="col-md-11">
                                        <input class="form-control" name="iconColor" id="iconColor" type="text"/>
                                    </div>
                                </div>
                            </div>
                            <div class="col-md-12">
                                <div class="form-group">
                                    <label class="col-md-1 control-label">摘要</label>
                                    <div class="col-md-11">
                                        <textarea class="form-control" name="summary" type="text" ></textarea>
                                    </div>
                                </div>
                            </div>

                        </div>
                    </div>
                </div>
                <%if(body.pageType==='/mixPage'){%>
                <div class="panel panel-success">
                    <div class="panel-heading">
                        <div class="panel-title">
                            上传图标
                        </div>
                    </div>
                    <div class="panel-body">
                        <div class="row">
                            <div class="col-md-10">
                                <div class="form-group" style="padding: 0 10px;">
                                    <div class="col-md-5">
                                        <label for="picSelect">图标预览:
                                            <!--<span class="help-block">大图片建议尺寸：900像素 * 500像素.</span>-->
                                        </label>
                                        <div class="ed-circleList">
                                            <div class="weui-grid__icon" id="editIcon-2">
                                                <img src="" alt="" id="seeImg">
                                            </div>
                                        </div>
                                        <input type="color" id="pickColor" class="form-control">
                                        <span class="btn btn-success fileinput-button" id="iconUploadBtn">
                                            <i class="glyphicon glyphicon-plus-sign"></i>
                                            <label>图片选择</label>
                                            <input id="iconUpload" type="file" name="media" multiple>
                                        </span>
                                    </div>
                                    <div class="col-md-4">
                                        <label for="picSelect">目录图标<span class="help-block">大图片建议尺寸：32像素 * 32像素,图片格式为png,透明.</span></label>
                                        <!--<label class="col-md-3 control-label">浏览样式</label>-->
                                    </div>
                                </div>

                                <input class="form-control" name="img" id="coverImage" type="hidden"/>
                            </div>
                        </div>
                    </div>
                </div>
                <%}else {%>
                <div class="panel panel-success">
                    <div class="panel-heading">
                        <div class="panel-title">
                            封面图片
                        </div>
                    </div>
                    <div class="panel-body">
                        <div class="row">
                            <div class="col-md-4">
                                <div class="form-group" style="padding: 0 10px;">
                                    <label for="picSelect">封面<span class="help-block">大图片建议尺寸：900像素 * 500像素.</span></label>
                                    <br/>
                                    <form class="form-horizontal" id="imageButton">
                                        <span class="btn btn-success fileinput-button">
                                            <i class="glyphicon glyphicon-plus-sign"></i>
                                            <label>图片选择</label>
                                            <input id="fileupload" type="file" name="media" multiple>
                                        </span>
                                    </form>
                                </div>
                                <input class="form-control" name="img" id="coverImage" type="hidden"/>
                            </div>
                            <div class="col-md-8">
                                <img src="" id="imageBody" style="display: none;max-width: 100%;">
                            </div>
                        </div>
                    </div>
                </div>
                <%}%>
                <div class="panel panel-primary">
                    <div class="panel-heading">
                        <div class="panel-title">
                            文章内容
                        </div>
                    </div>
                    <div class="panel-body padding-0" id="ueditPanel">
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>

<% include ../common/footer.ejs %>
<% include ../common/script.ejs %>
<script>
    $('<script type="text/plain" id="myEditor" style="width:100%;height:420px;">').appendTo($("#ueditPanel"));
</script>
<!--file-->
<script src="<%= global.config.path.publicPath %>/libs/jquery-file-upload/js/vendor/jquery.ui.widget.js"></script>
<script src="<%= global.config.path.publicPath %>/libs/jquery-file-upload/js/jquery.fileupload.js"></script>

<script src="<%= global.config.path.publicPath %>/libs/uedit/umeditor.config.js"></script>
<script src="<%= global.config.path.publicPath %>/libs/uedit/umeditor.min.js"></script>
<script src="<%= global.config.path.publicPath %>/libs/uedit/lang/zh-cn/zh-cn.js"></script>
</body>
</html>
